c
<template>
  <div class="create">
    <!-- card -->
    <el-card class="box-card">
      <!-- 标题 -->
      <div slot="header" class="clearfix">
        <span>用户创建</span>
        <el-button
          class="qf-r qf-create-btn"
          type="primary"
          round
          @click="jump('/users')"
          >返回
        </el-button>
      </div>
      <!-- 标题 -->
      <!-- 标题 -->

      <!-- 表单 -->
      <qf-form
        width="80px"
        :formConfig="formConfig"
        :formBtns="formBtns"
        @submit="submitFn">
      </qf-form>
      <!-- 表单 -->
    </el-card>
    <!-- card end -->
  </div>
</template>

<script>
export default {
  methods: {
    submitFn(formData) {
      console.log(formData);
    }
  },
  data() {
    return {
      // 表单配置
      formConfig: [
        {
          label: '账号',
          field: 'uname',
          type: 'text',
          rules: [
            {
              required: true,
              message: '请输入账号',
              trigger: 'blur'
            }
          ]
        },
        {
          label: '密码',
          field: 'pwd',
          type: 'password',
          showPwd: true,
          rules: [
            {
              required: true,
              message: '请输入密码',
              trigger: 'blur'
            }
          ]
        },
        {
          label: '密保问题',
          field: 'question',
          type: 'select',
          payload: [
            {
              label: '母亲的名字',
              value: '母亲的名字'
            },
            {
              label: '奶奶的名字',
              value: '奶奶的名字'
            },
            {
              label: '您其中一位老师的名字',
              value: '您其中一位老师的名字'
            }
          ],
          rules: [
            {
              required: true,
              message: '请选择密保问题',
              trigger: 'blur'
            }
          ]
        },
        {
          label: '密保答案',
          field: 'answer',
          type: 'text',
          rules: [
            {
              required: true,
              message: '请输入密保答案',
              trigger: 'blur'
            }
          ]
        }
      ],
      formBtns: [
        {
          content: '创建',
          type: 'primary'
        },
        {
          content: '重置',
          type: ''
        }
      ]
    };
  }
};
</script>

<style lang="scss" scoped>
// .users {
//   width: 100%;
//   height: 100%;

//   .el-card {
//     width: 96%;
//     margin: auto;
//   }
// }
</style>
